package cn.appsys.service.deve.appinfo;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.appsys.dao.deve.appinfo.DeveAppInfoMapper;
import cn.appsys.pojo.AppInfo;

@Service("deveAppInfoService")
public class DeveAppInfoServiceImpl implements DeveAppInfoService {

	@Resource
	private DeveAppInfoMapper deveAppInfoMapper;
	
	@Override
	public List<AppInfo> findAppInfoPage(String querySoftwareName,
			Integer queryStatus, Integer queryFlatformId,
			Integer queryCategoryLevel1, Integer queryCategoryLevel2,
			Integer queryCategoryLevel3, Integer from, Integer pageSize) {
		return deveAppInfoMapper.findAppInfoPage(querySoftwareName, queryStatus, queryFlatformId, queryCategoryLevel1, queryCategoryLevel2, queryCategoryLevel3, from, pageSize);
	}

	@Override
	public int getTotalCount(String querySoftwareName, Integer queryStatus,
			Integer queryFlatformId, Integer queryCategoryLevel1,
			Integer queryCategoryLevel2, Integer queryCategoryLevel3) {
		return deveAppInfoMapper.getTotalCount(querySoftwareName, queryStatus, queryFlatformId, queryCategoryLevel1, queryCategoryLevel2, queryCategoryLevel3);
	}

	@Override
	public AppInfo querAppByApkName(String apkName) {
		return deveAppInfoMapper.querAppByApkName(apkName);
	}

	@Override
	public int addSave(AppInfo appInfo) {
		return deveAppInfoMapper.addSave(appInfo);
	}

	@Override
	public AppInfo queryById(Integer id) {
		return deveAppInfoMapper.queryById(id);
	}

	@Override
	public int updateEmptyLogPath(Integer id) {
		return deveAppInfoMapper.updateEmptyLogPath(id);
	}

	@Override
	public int updateAppInfo(AppInfo appInfo) {
		return deveAppInfoMapper.updateAppInfo(appInfo);
	}

	@Override
	public boolean deleteAppInfoById(Integer delId) {
		int result= deveAppInfoMapper.deleteAppInfoById(delId);
		if(result>0){
			return true;
		}else{
			return false;
		}
	}

	@Override
	public boolean appsysUpdeteByAppId(AppInfo appInfo) {
		return false;
	}

}
